from tortoise import fields
from .base import BaseModel


class User(BaseModel):
    username = fields.CharField(max_length=50, unique=True, description="用户名")
    email = fields.CharField(max_length=100, unique=True, description="电子邮件")
    password = fields.CharField(max_length=255, description="密码")
    is_active = fields.BooleanField(default=True, description="是否激活")
    is_superuser = fields.BooleanField(default=False, description="是否为超级用户")

    class Meta:
        table = "t_user"
        description = "用户表"
